package com.wkq;

public class Main {
    public static void main(String[] args) {
        BinarySearchTree<Integer> binarySearchTree = new BinarySearchTree<>();
        int[] nums = {5, 3, 6, 8, 4, 2};
        for (int num : nums) {
            binarySearchTree.add(num);
        }
        binarySearchTree.prevOrder();
        System.out.println();
        System.out.println( binarySearchTree);
        System.out.println();
        binarySearchTree.inOrder();
        System.out.println();
        binarySearchTree.postOrder();
        System.out.println();
        binarySearchTree.prevOrder2();
        System.out.println();
        binarySearchTree.levelOrder();
//        binarySearchTree.removeMin();
//        binarySearchTree.levelOrder();
//        binarySearchTree.removeMax();
//        binarySearchTree.levelOrder();
        binarySearchTree.remove(3);
        binarySearchTree.levelOrder();

    }
}
